﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace TSL.Web.UI
{
    public class GVRowStyle
    {
        public static void RowStyle(object sender, GridViewRowEventArgs e)
        {
            e.Row.Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#C8F7FF'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#99ccff'");
                e.Row.Cells[i].Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
            }
        }
    }
}
